import { LeftOutline } from 'antd-mobile-icons';
import React, { Component } from 'react';
import '../styles/Set.scss'

class Set extends Component {
    back() {
        this.props.history.go(-1)
    }
    out(){
        localStorage.removeItem('use')
        this.props.history.push('/login')
    }
    render() {
        return (
            <div className='set'>
                <div className="top7">
                    <p><LeftOutline onClick={() => { this.back() }} /></p>
                    <p>系统设置</p>
                    <p> </p>
                </div>
                <div className="user7">
                    <div className="left41">
                        <img src={JSON.parse(localStorage.getItem('use')).pic} alt="" />
                    </div>
                    <div className="right41">
                        <div className="p41">{JSON.parse(localStorage.getItem('use')).name}</div>
                        <div className="p42">{JSON.parse(localStorage.getItem('use')).phone}</div>
                    </div>
                </div>
                <div className="bottom7" onClick={()=>{this.out()}}>
                    退出登录
                </div>

            </div>
        );
    }
}

export default Set;